using MicroMsg.Common.Utils;
using MicroMsg.Manager;
using MicroMsg.Storage;
using MicroMsg.UI.Util;
using Microsoft.Phone.Controls;
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
namespace MicroMsg.UI.Page
{
	public class QQMailFolderView : BasePage
	{
		private const string TAG = "QQMailFolderView";
		private bool isLoadComplete;
		internal Grid LayoutRoot;
		internal Grid LayoutContent;
		internal Grid webview;
		internal WebBrowser mailFolder;
		internal Canvas canvasProgressBar;
		internal PerformanceProgressBar ProgressBar;
		private bool _contentLoaded;
		public QQMailFolderView()
		{
			this.InitializeComponent();
		}
		protected override void OnPageIn(object[] object_0)
		{
			Account curAccount = AccountMgr.getCurAccount();
			if (curAccount == null)
			{
				Log.smethod_1("QQMailFolderView", "AccountMgr.getCurAccount() == null");
				return;
			}
			string strFSURL = curAccount.strFSURL;
			if (string.IsNullOrEmpty(strFSURL))
			{
				Log.smethod_1("QQMailFolderView", "AccountMgr.getCurAccount().strFSURL == null");
				return;
			}
			this.mailFolder.Navigate(new Uri(strFSURL));
		}
		private void web_Navigated(object sender, NavigationEventArgs e)
		{
			string originalString = e.get_Uri().get_OriginalString();
			QQMailNewMailView.updateSid(originalString);
			this.ProgressBar.IsIndeterminate = true;
		}
		private void web_loadedComplete(object sender, NavigationEventArgs e)
		{
			this.isLoadComplete = true;
			if (this.ProgressBar.IsIndeterminate)
			{
				this.ProgressBar.IsIndeterminate = false;
			}
		}
		[DebuggerNonUserCode]
		public void InitializeComponent()
		{
			if (this._contentLoaded)
			{
				return;
			}
			this._contentLoaded = true;
			Application.LoadComponent(this, new Uri("/MicroMsg;component/Source/Plugin/QQMail/UI/QQMailFolderView.xaml", 2));
			this.LayoutRoot = (Grid)base.FindName("LayoutRoot");
			this.LayoutContent = (Grid)base.FindName("LayoutContent");
			this.webview = (Grid)base.FindName("webview");
			this.mailFolder = (WebBrowser)base.FindName("mailFolder");
			this.canvasProgressBar = (Canvas)base.FindName("canvasProgressBar");
			this.ProgressBar = (PerformanceProgressBar)base.FindName("ProgressBar");
		}
	}
}
